-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
added documentation to _getBrightness() and _getGreen() function #7908
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple of minor typos @FerrinThreatt - otherwise looking good!
Adding documentation steward @perminder-17 - these are some new docs on the private functions, but please add any feedback, or feel free merge when it seems ready to you!
/** | ||
* This function extracts the green value from a color object, returns green | ||
* value in the range of 0 to 255 by default. When colorMode() is set to an | ||
* RBG value, the green value within the givin range is returned |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor - typo: "given"
src/color/p5.Color.js
Outdated
/** | ||
* Brightness obtains the HSB brightness value from either a p5.Color object, | ||
* an array of color components, or a CSS color string.Depending on value, | ||
* when colorMode() is set a HSB value, this function will returns the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor - typo: "will return" (sing.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your work, just some minor suggestions. :)
src/color/p5.Color.js
Outdated
/** | ||
* Brightness obtains the HSB brightness value from either a p5.Color object, | ||
* an array of color components, or a CSS color string.Depending on value, | ||
* when colorMode() is set a HSB value, this function will returns the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* when colorMode() is set a HSB value, this function will returns the | |
* when `colorMode()` is set to HSB, this function will returns the |
src/color/p5.Color.js
Outdated
@@ -546,6 +546,11 @@ class Color { | |||
} | |||
} | |||
|
|||
/** | |||
* This function extracts the green value from a color object, returns green |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should rephrase it to something like : "from a color object and returns it in the range 0–255 by default."
Co-authored-by: Perminder Singh <[email protected]>
Co-authored-by: Perminder Singh <[email protected]>
Co-authored-by: Perminder Singh <[email protected]>
Co-authored-by: Perminder Singh <[email protected]>
Co-authored-by: Perminder Singh <[email protected]>
@all-contributors please add @FerrinThreatt for doc |
I've put up a pull request to add @FerrinThreatt! 🎉 |
addresses #6971
Changes:
added documentation to _getBrightness() and _getGreen() functions
PR Checklist
npm run lint
passes